package com.ws.test05.test;

import com.ws.test05.entity.Employee;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author 王硕
 * @version jdk21
 * @className test
 * @description
 * @date 2024/11/21 21:38
 */
public class test {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        List<Employee> employees = new ArrayList<>();
        employees.add(new Employee().setName("张三").setBirthMonth(10).setSalary(18000.0));
        employees.add(new Employee().setName("李四").setBirthMonth(11).setSalary(15000.0));
        employees.add(new Employee().setName("王五").setBirthMonth(10).setSalary(16000.0));

        for (Employee employee : employees) {
            System.out.println(employee.toString());
        }

        int currentMonth = 11;
        int birthdayCount = input.nextInt();
        for (Employee employee : employees) {
            if (employee.getBirthMonth() == currentMonth) {
                birthdayCount++;
            }
        }
        System.out.println("过生日的员工数量: " + birthdayCount);
        double inputSalary = input.nextDouble();
        System.out.println("工资高于此工资的所有员工信息：");
        for (Employee employee : employees) {
            if (employee.getSalary() > inputSalary) {
                System.out.println(employee.toString());
            }
        }
    }
}
